package data

import (
	"core/corestruct"
	"core/coreutil"
	"ht/htinfo"
	"reflect"
)

type HtRoleDto struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	HtplatId   int64             `json:"htplatId,string"                    gorm:"column:htplat_id;DEFAULT:0;not null;comment:平台编号;"`
	Name       string            `json:"name"         validate:"required,max=50"gorm:"column:name;size:50;DEFAULT:'';not null;comment:角色名称;"`
	Memo       string            `json:"memo"                             gorm:"column:memo;DEFAULT:'';not null;comment:备注;"`
	CrtDt      corestruct.MyTime `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid     int64             `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:创建人编号;"`
	CrtDid     int64             `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
	HtplatName string            `json:"htplatName"                       gorm:"column:htplat_name;DEFAULT:'';not null;comment:平台名称;"`
	CrtUname   string            `json:"crtUname"                         gorm:"column:crt_uname;DEFAULT:'';not null;comment:创建人;"`
	CrtDname   string            `json:"crtDname"                         gorm:"column:crt_dname;DEFAULT:'';not null;comment:创建机构;"`
	HtmenuIds  *[]string         `json:"htmenuIds"                        gorm:"-;comment:权限菜单;"`
}

func HtRoleDtoInit() {
	var mcls = &HtRoleDto{}
	var m = &corestruct.MyClass{
		Name:     "角色Dto",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  htinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}
